animal = { age = 3   }
dog= { legs= 4}
xiaodog = setmetatable(dog,
        {__index =animal}
)

function dog:eat()
    print("eat")
    print((self.legs))
end
print(xiaodog.age)

print(xiaodog.legs)
dog.legs=5
dog:eat();


